<template>
    <div class="dialog-box">

        <el-dialog
                title="免责声明"
                :visible.sync="centerDialogVisible"
                width="20rem"
                center>
            <span>{{info}}</span>

            <span slot="footer" class="dialog-footer">
                 <span class="check"><el-checkbox v-model="checked">我同意<router-link tag="span" to="/home/statement">《AIBinance服务声明》</router-link></el-checkbox></span>
<!--                <el-button @click="centerDialogVisible = false">取 消</el-button>-->
                <el-button type="primary" @click="centerDialogVisible = false">确 定</el-button>
            </span>
        </el-dialog>
    </div>
</template>

<script>
    export default {
        name: "Dialog",
        data() {
            return {
                centerDialogVisible: false,
                checked: true,
                info:{},
                type:82
            };
        },
        mounted(){
            if(this.getCookie("token")==null||this.getCookie("token")==''){
                this.centerDialogVisible = true
            }else{
                this.centerDialogVisible = false
            }
            let data = {
                token: this.getCookie("token"),
                type:this.type
            }
            this.$api.home.GetStatement(data).then(res=> {
                // 执行某些操作
                this.info = res.data.data


            })

        },
        methods:{
            centerDialog(){
                this.centerDialogVisible = true
            }
        }
    }
</script>

<style scoped>
    .check{
        margin: 1rem auto;
    }
</style>
<style>
    .dialog-box .el-dialog--center{
        width:18.13rem!important;
        height:17.16rem!important;
        background:rgba(255,255,255,1);
        border-radius:0.5rem!important;
        margin-top: 12rem!important;
    }
    .dialog-box .el-dialog__body{
        padding: 0px 25px!important;
        font-size:0.81rem;
        font-family:PingFang SC;
        font-weight:500;
        color:rgba(51,51,51,1);
        line-height:1.13rem;
    }
    .dialog-box .el-checkbox__label{
        padding-left:8px!important;
        font-size:0.75rem!important;
        font-family:PingFang SC;
        font-weight:500!important;
        color:rgba(51,51,51,1);

    }
    .dialog-box .el-checkbox__label span{
        color: #14A365;
    }
    .dialog-box .el-checkbox__inner{
        border-color:#999!important;
        border-radius: 50% !important;
    }
    .dialog-box .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner{
        background: #14A365 !important;
        border-color:#14A365!important;
        border-radius: 50% !important;
    }
    .dialog-box .el-checkbox__input.is-checked+.el-checkbox__label{
        font-size:0.75rem!important;
        font-family:PingFang SC;
        font-weight:500!important;
        color:rgba(51,51,51,1);
    }
    .dialog-box .el-checkbox__input.is-checked+.el-checkbox__label span{
        color: #14A365;

    }

    .dialog-box .el-button--primary{
        width:12.5rem!important;
        height:2rem!important;
        background:rgba(20,163,101,1);
        border-radius:0.2rem;
        font-size:0.94rem;
        font-family:PingFang SC;
        font-weight:500;
        color:rgba(255,255,255,1);
        margin: 1rem 0;
        line-height: 2rem!important;
        padding: 0!important;
        border-color: rgba(20,163,101,1);
    }
</style>